package com.jt.orange;

import android.os.Trace;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;


public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    Boolean flag= true;
    public void btnchange(View v)
    {
        TextView tw = findViewById(R.id.textview1);
        if (flag) tw.setText("text1");
        else tw.setText("text2");
        flag=!flag;
    }
}
